#include <iostream>
#include <json/json.h>
#include <string>

int main(){
    // 1. 测试用例1
    Json::Value root;
    root["name"] = "zdl";
    root["age"] = 20;
    root["school"] = "西南石油大学(南充校区)";
    Json::Value score;
    score["语文"] = 100;
    score["英语"] = 32;
    score["数学"] = 43;
    score["历史"] = 34;
    score["地理"] = 89;
    score["物理"] = 65;
    root["score"] = score;
    Json::StreamWriterBuilder writer;
    writer["emitUTF8"] = true;
    std::unique_ptr<Json::StreamWriter> write(writer.newStreamWriter());
    std::stringstream ss;
    write->write(root, &ss);
    std::cout << ss.str() << std::endl;
    return 0;
}